package kin.manager.system;

import java.io.Serializable;

import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;

import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate4.LocalSessionFactoryBean;




import kin.bean.system.Result;




public interface BaseManager<T>{
	

	public T find(LinkedHashMap<String, Object> where,LinkedHashMap<String, Boolean> orderby,String className)throws Exception;
	
        public List<T> findAll() throws Exception;
        	
      public List<T> findList(LinkedHashMap<String, Object> where,LinkedHashMap<String, Collection> in,LinkedHashMap<String, Boolean> orderby,LinkedHashMap<String, Collection> like)throws Exception;

      public Result findPaging(LinkedHashMap<String, Object> where,LinkedHashMap<String, String[]> in,LinkedHashMap<String, Boolean> orderby,int page,int start,int max)throws Exception;
		public void add(T entity)throws Exception;
		/**
		 * ����ʵ��
		 * @param entity ʵ��id
		 */
		
	    public SessionFactory getSessionFactory();
	    
	  
	    
	   // public SessionFactory getCustomerSessionFactory();
		public void update(Object entity)throws Exception;
		/**
		 * ɾ��ʵ��
		 * @param entityClass ʵ����
		 * @param entityids ʵ��id����
		 */
		public void delete(Serializable entityids)throws Exception;
		/**
		 * ��ȡʵ��
		 * @param <T>
		 * @param entityClass ʵ����
		 * @param entityId ʵ��id
		 * @return
		 */
		
		//public Object sql(String sql);
		public T get(Serializable entityId);
		
		public T load(Serializable entityId);
		
		public  List exportExcel(String query);
		
		public void deleteAll();
		
		
	}



